if ( SERVER ) then

	AddCSLuaFile( "shared.lua" )

	SWEP.HoldType			= "rifle"

end

if ( CLIENT ) then

	SWEP.PrintName			= "LR300 with Grenade Launcher"
	SWEP.Author			= "callofduty511"

	SWEP.Slot			= 3
	SWEP.SlotPos			= 3
	SWEP.ViewModelFOV		= 64
	SWEP.IconLetter			= "x"

	killicon.AddFont( "weapon_famas", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ) )	

end

SWEP.Base		= "weapon_cs_base"
SWEP.Category			= "SGRP Stuff"
SWEP.Author		= "callofduty511	"
SWEP.Contact		= "kent122@hotmail.com"
SWEP.Purpose		= "Death and Destruction"
SWEP.Instructions	= "Left click to fire and Right click to launch grenade"
SWEP.Spawnable		= true
SWEP.AdminSpawnable	= true
SWEP.Base			= "weapon_cs_base"
SWEP.ViewModelFlip	= false
SWEP.Weight		= 6
SWEP.AutoSwitchTo	= false
SWEP.AutoSwitchFrom	= true
SWEP.ForceApply		= 5
SWEP.TracerFreq		= 2

SWEP.ViewModel			= "models/weapons/v_rif_lr300.mdl"
SWEP.WorldModel		= "models/weapons/w_rif_lr300.mdl"

SWEP.Primary.Sound		= Sound( "weapon_famas.single" )
SWEP.Primary.Delay		= 0.09
SWEP.Primary.Recoil		= 1
SWEP.Primary.Damage		= 30
SWEP.Primary.NumShots		= 1
SWEP.Primary.Cone		= 0.03
SWEP.Primary.ClipSize		= 30
SWEP.Primary.DefaultClip	= 500
SWEP.Primary.Automatic		= true
SWEP.Primary.Ammo		= "smg1"

SWEP.Secondary.Delay		= 2.0
SWEP.Secondary.Recoil		= 4
SWEP.Secondary.Damage		= 150
SWEP.Secondary.NumShots	= 1
SWEP.Secondary.Cone		= 3
SWEP.Secondary.ClipSize		= 1
SWEP.Secondary.DefaultClip	= 50
SWEP.Secondary.Automatic   	= false
SWEP.Secondary.Ammo         = "grenade_ar2"

//Config

function SWEP:SecondaryAttack()
nade = ents.Create("grenade_ar2")
                nade:SetOwner(self.Owner)
                nade:SetPos(self.Owner:GetShootPos())
                nade:SetAngles(self.Owner:GetAimVector())
                nade:Spawn()                
                nade:SetVelocity(self.Owner:GetAimVector() * 750)                                                self.Weapon:EmitSound("Weapon_rpg.Single", 1, 1)                                                self.Weapon:SendWeaponAnim( ACT_VM_RECOIL1 )
                --self.Weapon:
                self:TakeSecondaryAmmo( 0 ) 
end

SWEP.data = {}
SWEP.mode = "auto" //The starting firemode
SWEP.data.newclip = false //Don't Change

//End of Config
